function parse(javaData) {
  let newObj = {}
  //let javaData = '{"uname":"xiaozhi","age":"18"}'
  javaData = javaData.replace(/{|}|"|\s/g, '')
  //console.log(javaData);
  let javaDataArr = javaData.split(',')
  //console.log(javaDataArr);
  javaDataArr.forEach(item => {
    let javaDataArr2 = item.split(':')
    let key = javaDataArr2[0]
    let val = javaDataArr2[1]
    newObj[key] = val
  })
  return newObj
}
//console.log(parse());

function stringify(webData) {
  let newArr = []
  //let webData = { uname: 'xiaozhi', age: 18 }
  for (let k in webData) {
    let temp = `"${k}":"${webData[k]}"`
    newArr.push(temp)
  }
  let javaData = `{${newArr.join(',')}}`
  return javaData
  //console.log(javaData);
  //console.log(newArr);
}


